<?= (count($data) == 0) ? '<div>Не найдено ни одной записи для отображения</div>' : FALSE ?>    
<div class="row-fluid">
    <ul class="thumbnails">
        <? $i = 0; foreach ($data as $key => $item): ?>
            <?
                //echo $i;
                if ($item->id == $defaults['item_id']) {
                    $trbg = 'active-tr';
                    $edit_img = '';
                } else {
                    $trbg = '';
                    $edit_img = '<a class="btn content-management" href="'.$defaults['baseUrl'].'administration/'.$defaults['controller'].'/'.$defaults['page'].'/edit/'.$item->id.'"><i class="icon-pencil"></i></a>';
                }
            ?>
            <li class="span3 <?= $trbg ?>" <?= ($i % 4 == 0) ? 'style="margin-left: 0"' : FALSE ?>>
                <div class="thumbnail">
                    <img data-src="holder.js/300x200" alt="300x200" style="width: 300px" src="<?= (is_file($_SERVER['DOCUMENT_ROOT'].'/'.$params['admin_image_url'].'/'.$item->$params['admin_image_field'])) ? URL::site($params['admin_image_url'].'/'.$item->$params['admin_image_field']) : '' ?>">
                    <div class="caption" style="margin-top: 4px">
                        <?= $edit_img ?> <a class="btn content-management" href="<?= $defaults['baseUrl'] ?>administration/<?= $defaults['controller'] ?>/<?= $defaults['page'] ?>/delete/<?= $item->id ?>"><i class="icon-remove"></i></a>
                        <? if (!empty($params['sortable'])): ?>
                            <div class="sortContainer" style="float: right; margin: 2px 0 0 0">
                                <div class="sort" style="top: 0">
                                    <input type="text" class="input-mini sort-input" value="<?= $item->sort ?>" onchange="sort('<?= URL::base() ?>administration/Asort/set/<?= $defaults['controller'] ?>/<?= $item->id ?>', this)">
                                    <img src="<?= $defaults['baseUrl'] ?>static/administration/css/images/loading.gif" alt="" />
                                </div>
                            </div>
                        <? endif ?>
                    </div>
                </div>
            </li>
        <? $i++; endforeach ?>
     </ul>
</div>